package cn.wolfcode.luowowo.website.web.controller;

import cn.wolfcode.luowowo.article.domain.TicketCommend;
import cn.wolfcode.luowowo.article.service.ITicketCommendService;
import com.alibaba.dubbo.config.annotation.Reference;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;

@Controller
@RequestMapping("/ticket")
public class TicketController {
    @Reference
    private ITicketCommendService ticketCommendService;
    @RequestMapping("")
    public String index(Model model){
        List<TicketCommend> top4 = ticketCommendService.getTop4();
        model.addAttribute("top4",top4);
        return "/ticket/index";
    }
}
